<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box{
      background-color: cadetblue;
      /* vw视口宽度比,1vw = 1% 的视口宽度 */
      width: 50vw;
       /* vh视口高度比,1vw = 1% 的视口高度  使用较少*/
      height: 50vh;
    }
  </style>
</head>
<body>
  <div class="box">盒子</div>
</body>
</html>